package dao.test;

import cn.bx.bid.dao.ProjectDao;
import cn.bx.bid.entity.ProfessorEnroll;
import cn.bx.bid.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.util.List;

public class ProjectTesst {
    private SqlSession s;
    private ProjectDao dao;
    @Before
    public void before(){
        s= MyBatisUtil.get();
        dao=s.getMapper(ProjectDao.class);
    }
    @After
    public void close(){
        MyBatisUtil.close(s);
    }
    @Test
    public void testS1(){
        List<ProfessorEnroll> l=dao.searchProfessorInProjs(3L);
        System.out.println(l.size()+">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        for(ProfessorEnroll r:l){
            System.out.println(r.getProf()+">>>>>"+r.getRand());
        }
    }
}
